package pkmn.move;

import java.util.Random;
import pkmn.battle.BattlePokemon;
import pkmn.status.Status;
import pkmn.status.StatusEnum;
import pkmn.util.Util;

public class ApplyParalyzis extends IndirectAction{

    @Override
    public void execute(BattlePokemon battlePokemon){
        if (battlePokemon.getPokemon().getStatus().equals(StatusEnum.paralyzis)){
            Util.printAndWait(battlePokemon + " is already paralyzed!");
        }else if (battlePokemon.getPokemon().getStatus().equals(StatusEnum.none)){
            battlePokemon.getPokemon().setStatus(new Status(StatusEnum.paralyzis, new Random().nextInt(5) + 1));
            Util.printAndWait(battlePokemon + " is paralyzed! It can't move!");
        }else
            Util.printAndWait("But, it failed!");
    }
}
